/**
* @author AlbertDarren
* @contact 2563491540@qq.com
*/
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
void find_first_all(string str,string target,string::size_type pos=0)
{
    while ((pos=str.find_first_of(target,pos))!=string::npos)
    {
        cout << str[pos] << " ";
        ++pos;
    }
    cout <<  endl;
}
void find_first_not_all(string str,string target,string::size_type pos=0)
{
    while ((pos=str.find_first_not_of(target,pos))!=string::npos)
    {
        cout << str[pos] << " ";
        ++pos;
    }
    cout <<  endl;
}
int main_23()
{
    string html="<head></head><body><span>14</span><p>Hello World!520&amps;</p>36</body>";
    string::size_type pos=html.find("p>");//20
    if (pos!=string::npos)
    {
        cout << pos << endl;
    }
    else
    {
        cout << "Not exist" << endl;
    }
    string digits="7239840156";
    find_first_all(html,digits);
    find_first_not_all(html,digits);
    string alpha;
    for (char c='A';c<='Z' ;++c )
    {
        alpha.insert(alpha.end(),c);
        alpha.insert(alpha.end(),tolower(c));
    }
    find_first_all(html,alpha);
    find_first_not_all(html,alpha);
    return 0;
}
